package HomeWork3;

public class Work5 {
	public static void main(String[] args) {
        String str = "java woaijava,i liek jajavava,i enjoy java";
        String target = "java";
        
        String result = removeSubstring(str, target);
        System.out.println(result);
    }
    
    public static String removeSubstring(String str, String target) {
    	while(str.indexOf("java")!=-1){
    		str=str.replace(target, "");
    	}
        return str;
    }
}

